473,425 Members | 1,876 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,425 software developers and data experts.

"Roll-up" or "collapse" IFrame?

I have an IFrame on my web pages that displays useful tips. I have a button
next to it that hides and shows it by triggering a Javascript call. I know
how to make the iframe invisible by changing it's "visibility" property, and
I know how to change it's size using the style "height" property.

The problem is, with both of those techniques the IFRAME still occupies the
same amount of real estate as before, even if it's now invisible / shrunken.
That is, the elements vertically below it in the containing TABLE do not
move up to fill in the unoccupied screen space. (Note: I am *not*
specifying any row or cell heights at all.)

How can I get the rest of the page to move up when I hide / shrink the
IFrame with Javascript?

Thanks.
Jul 23 '05 #1
3 5567


Robert Oschler wrote:
How can I get the rest of the page to move up when I hide / shrink the
IFrame with Javascript?


There is no difference to other elements, if you want to make an element
not consume any layout space and be hidden then set the CSS display
property to none e.g.
iframeElement.style.display = 'none'
to show it again set
iframeElement.style.display = ''
--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 23 '05 #2

"Martin Honnen" <ma*******@yahoo.de> wrote in message
news:42***********************@newsread4.arcor-online.net...


There is no difference to other elements, if you want to make an element
not consume any layout space and be hidden then set the CSS display
property to none e.g.
iframeElement.style.display = 'none'
to show it again set
iframeElement.style.display = ''
--

Martin Honnen
http://JavaScript.FAQTs.com/


Thanks Martin, that did the trick. Got any quick ideas on what I could put
in it's place as an attractive "placeholder"? Something about 5 pixels
high?

Jul 23 '05 #3
alu

"Robert Oschler" <no************@nospam.com> wrote
I have an IFrame on my web pages that displays useful tips. I have a button next to it that hides and shows it by triggering a Javascript call. I know how to make the iframe invisible by changing it's "visibility" property, and I know how to change it's size using the style "height" property.

The problem is, with both of those techniques the IFRAME still occupies the same amount of real estate as before, even if it's now invisible / shrunken. That is, the elements vertically below it in the containing TABLE do not
move up to fill in the unoccupied screen space. (Note: I am *not*
specifying any row or cell heights at all.)

How can I get the rest of the page to move up when I hide / shrink the
IFrame with Javascript?

Thanks.


_________________________________________

what you want is style="display:none;" not "visibility:hidden"

-alu
Jul 23 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Csaba2000 | last post by:
I want to be able to embed a single quote into an INPUT element within a dynamically generated IFRAME. The example below shows how the IFRAME is generated. Challenge: I'd like the alert box to...
4
by: Thomas | last post by:
Hi there, I have an iframe which is editable (designMode = "on") and want to resize it dynamically as the content grows (e.g. more lines of text is in there) and there the struggle starts. I...
2
by: Templar | last post by:
Hi i'm bothering with such problem... I must dynamic create an Iframe, and then put som raw HTML into it. But I can't. When I create iframe, I can't access its properties. Here's the coe...
1
by: Martin | last post by:
There seems to be some strange behaviour when trying to get the scrollHeight and scrollTop of an iframe in IE6. I have tried several ways of getting these values when the iframe is written into...
7
by: Christopher J. Hahn | last post by:
I'm trying to use a script-generated form to submit to a script-generated iframe. The problem I'm running into is that the iframe is not assuming the name I assign it. IE6 on Win2000. FF1.0.2+...
3
by: Angel | last post by:
How do I get the reference of the IFrame from the asp.net webpage that is being displayed within that IFrame? In other words I have an IFrame in my page. Within that IFrame Set the source to a...
1
by: jaktharkhan | last post by:
Hi, I really really need help in trying to figure out how can I do a CloneNode on an Iframe where the cloned IFRAME clones with all its contents?. Basically what I am doing is dynamically building...
0
by: tequilamala | last post by:
I have an Iframe in one of the pages i am developing... the iframe is suppose to scroll up and down and the links target the iframe. the problem is that the iframe scrolls side to side on internet...
1
by: Z1P2 | last post by:
I would like to gradually resize an iframe in an onmouseover event. I can easily do it with an image, but when I try to do it with an iframe, it doesn't do anything. So first of all, is it possible...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.